<template>
    <div class="block">

        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
            :current-page.sync="currentPage" :page-size="100" layout="total, prev, pager, next" :total="total"  >
        </el-pagination>
        <div class="block">
  </div>
    </div>
</template>
    
<script>
export default {
    data(){
        return{
            currentPage:this.page
        }
    },
    props: {
        page: {
            type: Number,
            default: 0,
        },
        total:{
            type: Number,
            default: 0,
        }
    },
    methods: {
        handleSizeChange(val) {
            this.$emit('pagination', { page: this.currentPage})
            console.log(`每页 ${val} 条`);
        },
        handleCurrentChange(val) {
            this.$emit('pagination', { page: this.currentPage})
            console.log(`当前页: ${val}`);
        },
    },
};
</script>
    
<style></style>
    